package com.zhuangxiaoyan.spring.transaction.controller;

import com.zhuangxiaoyan.spring.transaction.entity.Account;
import com.zhuangxiaoyan.spring.transaction.dao.AccountService1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Classname AccountController
 * @Description TODO
 * @Date 2022/5/3 10:34
 * @Created by xjl
 */
@RestController
public class AccountController {

    @Autowired
    private AccountService1 accountService;

    @PostMapping(value = "test")
    public String test(@RequestBody Account account){
        accountService.save(account);
        return "";
    }
}
